package com.woniuxy.tfss;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.woniuxy.tfss.websocket.JacksonObjectMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication
@MapperScan("com.woniuxy.tfss.mapper")
@EnableScheduling
@ServletComponentScan(basePackages = {"com.woniuxy.tfss.filter"})
public class TfssApplication {

    public static void main(String[] args) {
        SpringApplication.run(TfssApplication.class, args);
    }

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
    @Bean
    public JacksonObjectMapper jacksonObjectMapper(){
        return new JacksonObjectMapper();
    }
}
